<?php if (!defined('BASEPATH')) exit('No direct access allowed.');

/** 前台父控制器 */
class CF_Controller extends CI_Controller {
    
	public function __construct() {
		parent::__construct();
		switch ($_SERVER['HTTP_HOST']) { 
		    case 'm.ichufang.cn': 
		        $this->load->switch_theme_on('mobile');
		        break;
		    default: 
		        $this->load->switch_theme_on('default');
		        break; 
		} 
	    /** 前台页面均使用主题皮肤功能 */
    }

}

/** 后台父控制器 */
class Admin_Controller extends CI_Controller {

    public function __construct() {
        
		parent::__construct();
		
		/** 检查权限URL */		
		$this->user_login->check_uri_permissions();
		
	    /** 后台管理页面，不使用皮肤 */
	    $this->load->switch_theme_off();
    }
    
	public function _jui_message($message = '', $id = 'Item')
	{
		$data = array(
			"statusCode" => 200,
      		"message" => $message,
      		"navTabId" => $id,	//返回一个分类ID(rel) ajax自动刷新
			"rel" => "",
      		"callbackType" => "",
      		"forwardUrl" => ""
		);
		$this->output->set_output(json_encode($data));
	}
}

/* End of file MY_Controller.php */
/* Location: ./application/libraries/MY_Controller.php */
